:root {
    --board-size: 600px;
    --grid-color: #222;
    --board-bg: #e0b86b;
    --surface-bg: #ffffff;
    --text-primary: #222;
    --text-secondary: #666;
    --accent: #ff7043;
    --accent-light: #ffd1c0;
    --secondary: #4a6fa5;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    background: linear-gradient(160deg, #fdf6e3 0%, #f1e4c6 100%);
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 720px;
}

h1 {
    font-size: 2.4rem;
    margin: 0;
    letter-spacing: 4px;
    text-shadow: 1px 2px 6px rgba(0, 0, 0, 0.08);
}

.info-card {
    width: 100%;
    background-color: var(--surface-bg);
    border-radius: 14px;
    padding: 18px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.status-line {
    margin: 0;
    font-size: 1.05rem;
}

.label {
    color: var(--text-secondary);
}

.player {
    font-weight: 600;
    transition: color 0.3s ease;
}

.player-black {
    color: #000;
}

.player-white {
    color: #c0c0c0;
}

#status-message {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.timer {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 1.1rem;
}

.timer-display {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--secondary);
    min-width: 42px;
    text-align: right;
}

.timer-danger {
    color: var(--accent);
}

.timer-unit {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.actions {
    display: flex;
    gap: 12px;
}

button {
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    border: none;
    padding: 10px 24px;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 6px 14px rgba(255, 112, 67, 0.35);
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(255, 112, 67, 0.4);
    filter: brightness(1.05);
}

.btn-secondary {
    background-color: #e8eff6;
    color: var(--secondary);
    box-shadow: 0 6px 14px rgba(74, 111, 165, 0.2);
}

.btn-secondary:hover:not(:disabled),
.btn-secondary:focus:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(74, 111, 165, 0.25);
    filter: brightness(1.05);
}

button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.4);
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

canvas {
    background-color: var(--board-bg);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    width: var(--board-size);
    height: var(--board-size);
    max-width: 90vw;
    max-height: 90vw;
}

@media (max-width: 700px) {
    body {
        padding: 12px;
    }

    h1 {
        font-size: 1.8rem;
    }

    canvas {
        max-width: 95vw;
        max-height: 95vw;
    }
}
